Skip to content

[ENHANCEMENT] Skip binary/image/asset files and deprioritize tests in Overture PRojection#36

Merged
John McCall (lowlydba) merged 9 commits into
mainfrom
lowlydba/feat-skip-binary-files-in-reviewer
Jun 18, 2026
Merged

[ENHANCEMENT] Skip binary/image/asset files and deprioritize tests in Overture PRojection#36
John McCall (lowlydba) merged 9 commits into
mainfrom
lowlydba/feat-skip-binary-files-in-reviewer

Conversation

@lowlydba

@lowlydba John McCall (lowlydba) commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Closes #35

Summary

Improves token budget utilization in Overture PRojection so meaningful source files aren't crowded out by assets, test files, and data that don't benefit from code review.

Changes

Ignore outright (no reviewable content)

Extended the default ignore-files list to skip:

  • Images/SVGs: *.png, *.jpg, *.jpeg, *.gif, *.ico, *.webp, *.bmp, *.tiff, *.svg
  • Fonts: *.woff, *.woff2, *.ttf, *.eot, *.otf
  • Archives/binaries: *.zip, *.tar, *.gz, *.tgz, *.jar, *.war, *.class, *.pyc, *.pyo
  • Media: *.mp4, *.mp3, *.wav, *.pdf
  • Minified: *.min.js, *.min.css
  • Geospatial data: *.geojson, *.parquet, *.geoparquet, *.pmtiles, *.mbtiles, *.csv

Deprioritized (reviewed when budget allows, cut first when tight)

  • Test files: __tests__/, *.test.*, *.spec.*, test_*, *_test.*
  • Fixture/data dirs: fixtures/, testdata/, test-fixtures/, __fixtures__/

Config files (package.json, tools.json, tsconfig.json, etc.) are unaffected.

Tests: signal fix

When test files are deprioritized out of the diff budget, the model was incorrectly seeing Tests: ❌ none in diff. Now checks budgetSkippedFiles too and shows one of:

  • Tests: ✅ — tests reviewed in diff
  • Tests: ✅ (not reviewed — budget-cut) — tests present in PR but cut for context
  • Tests: ❌ none in diff — genuinely no tests in the PR

workflow_dispatch UX

  • model, selection_model, model_provider are now type: choice dropdowns with annotated options
  • Claude/Anthropic options are clearly labeled as requiring model_provider: anthropic

GitHub Models sunset notice

GitHub announced GitHub Models retirement on 2026-06-16 (existing customers unaffected for now, timeline TBD). Noted in README.md and defaults.js with the migration path (model-provider: anthropic + ANTHROPIC_API_KEY).

Tests

41 tests passing across diff.js and prompt.js (6 new tests added).

… default

Extends the default ignore-files list to exclude common binary and asset
file types (images, SVGs, fonts, archives, minified bundles) that have no
reviewable code logic. This preserves the diff budget for source files that
actually matter.

Fixes #35

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Signed-off-by: John McCall <john@overturemaps.org>
@overture-projection

overture-projection Bot commented Jun 17, 2026

Copy link
Copy Markdown

Overture PRojection Review

This PR enhances the Overture PRojection GitHub Action to skip binary/image/asset files and deprioritize test/fixture files when selecting files for code review, improving token budget utilization and review relevance. It also updates the test signal logic and improves workflow UX for model selection.

✅ Checks Passed

  • The ignore list now comprehensively skips non-reviewable assets (images, fonts, binaries, media, minified files, geospatial data, CSVs).
  • Test and fixture files are deprioritized, ensuring source files are reviewed first when context is tight.
  • The Tests: signal now accurately reflects whether tests were present but skipped due to budget, reviewed, or absent.
  • Workflow UX improvements (dropdowns, clear provider/model mapping, sunset notice for GitHub Models).
  • 41 tests passing, with 6 new tests covering the new logic.

🚩 Flags

  • None observed. The changes are well-targeted, with clear separation between outright ignored files and deprioritized files. No logic errors, security issues, or process violations are visible.

❓ Open Questions

  • None. The intent and implementation are clear and well-documented.

No further action required. This is a solid enhancement that will improve review quality and efficiency.

@lowlydba John McCall (lowlydba) marked this pull request as ready for review June 17, 2026 14:41
@lowlydba John McCall (lowlydba) requested a review from a team as a code owner June 17, 2026 14:41
Copilot AI review requested due to automatic review settings June 17, 2026 14:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends the default ignore-files patterns for the .github/actions/overture-projection composite action so that common binary / asset file types (images, fonts, archives, media, minified assets) are excluded from the diff content sent to the review model, preserving diff/token budget for actual source files.

Changes:

  • Expanded the default ignore-files block in action.yml to include common image/font/archive/media/minified file patterns.
  • Keeps the existing override behavior intact (callers can set ignore-files: "" to disable exclusions).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Revert to @main before merge.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Signed-off-by: John McCall <john@overturemaps.org>
Sort test files to the end of the file list before applyFileBudget so
source files win the context window when budget is tight. Test files are
still reviewed when budget allows — they are never ignored outright.

Matches: __tests__/, *.test.*, *.spec.*, test_*.*, *_test.*

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Signed-off-by: John McCall <john@overturemaps.org>
Replaces freeform model/selection_model/model_provider strings with
type:choice dropdowns for manual runs. Each option includes an inline
comment describing context window / speed / cost tradeoffs.

workflow_call inputs are unchanged (type:choice is unsupported there).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Signed-off-by: John McCall <john@overturemaps.org>
Adds claude-opus-4-6, claude-sonnet-4-5, claude-haiku-4-6 back to the
model choice list with provider annotations. Description clarifies which
options require model_provider=anthropic.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Signed-off-by: John McCall <john@overturemaps.org>
GitHub announced GitHub Models retirement on 2026-06-16 (existing
customers unaffected for now, timeline TBD). Documents the migration
path (model-provider: anthropic + ANTHROPIC_API_KEY) where someone
will naturally look when it becomes urgent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Signed-off-by: John McCall <john@overturemaps.org>
Ignore outright (no reviewable diff): *.geojson, *.parquet, *.geoparquet,
*.pmtiles, *.mbtiles, *.csv

Deprioritize (reviewed when budget allows, cut first when tight):
fixtures/, testdata/, test-fixtures/, __fixtures__/

package.json, tools.json, tsconfig.json etc. are unaffected.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Signed-off-by: John McCall <john@overturemaps.org>
When test files are deprioritized and dropped from the diff budget,
the Tests: signal was showing ❌ none in diff even though tests exist
in the PR — causing the model to falsely flag missing test coverage.

Now checks budgetSkippedFiles as well as included files. Distinguishes
three states:
  ✅                         — tests reviewed in diff
  ✅ (not reviewed — budget-cut) — tests present but cut for context
  ❌ none in diff            — no tests in the PR at all

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Signed-off-by: John McCall <john@overturemaps.org>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Signed-off-by: John McCall <john@overturemaps.org>
@lowlydba John McCall (lowlydba) changed the title [ENHANCEMENT] Skip binary/image/asset files in Overture PRojection by default [ENHANCEMENT] Skip binary/image/asset files and deprioritize tests in Overture PRojection Jun 17, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm. I don't know if AI finds unit tests useful, I do as a human!

@lowlydba John McCall (lowlydba) merged commit 9adb511 into main Jun 18, 2026
11 checks passed
@lowlydba John McCall (lowlydba) deleted the lowlydba/feat-skip-binary-files-in-reviewer branch June 18, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Skip binary/image/asset files in Overture PRojection by default

3 participants